﻿@model BlazorShop.Models.Order

@{
    ViewData["Title"] = "Details";
}

<h1>Details</h1>

<div>
    <h4>Order</h4>
    <hr />
    <dl class="row">
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.CustomerId)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.CustomerId)
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.CustomerName)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.CustomerName)
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.CustomerEmail)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.CustomerEmail)
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.Address)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.Address)
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.Telephone)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.Telephone)
        </dd>
        
        <dt class = "col-sm-2">
            
            @Html.DisplayNameFor(model => model.PayType)

        </dt>
        <dd class = "col-sm-10">
            @{
                if (Model?.PayType == 1)
                {
                    <span>支付宝</span>
                }
                else
                {
                    <span>微信</span>
                }
            }
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.IsShip)
        </dt>
        <dd class = "col-sm-10">
            @{
                if (Model.IsShip)
                {
                    <span>已发货</span>
                }
                else
                {
                    <span>未发货</span>
                }
            }
        </dd>
        <dt class = "col-sm-2">
            @Html.DisplayNameFor(model => model.ShipedAt)
        </dt>
        <dd class = "col-sm-10">
            @Html.DisplayFor(model => model.ShipedAt)
        </dd>
    </dl>
</div>
<div>
    <a asp-action="Edit" asp-route-id="@Model?.OrderId">Edit</a> |
    <a asp-action="Index">Back to List</a>
</div>
